package com.njbdqn.qiy_shop.shopdao;

import java.util.List;

import org.njbdqn.commons.database.PageHelper;
import org.njbdqn.commons.database.SqlTemplate;

import com.njbdqn.qiy_shop.shopentity.Commodity;
import com.njbdqn.qiy_shop.shopvo.LiJiQiangGouVO;


public class QiangGouDAO {
	private SqlTemplate tem;
	private PageHelper ph;
	
	public QiangGouDAO(){
		this.tem=new SqlTemplate();
		this.ph=new PageHelper();
	}
	
	public List<LiJiQiangGouVO> resultToList(int commodityid){
		String sql = "select shoppicname from shoppic where commodityid=?";
		return tem.resultToArray(sql, new Object[]{commodityid},LiJiQiangGouVO.class);
	}
	
	public List<Commodity> findById(int commodityid){
		String sql = "select * from commodity where commodityid=? ";
		return  tem.resultToArray(sql, new Object[]{commodityid},Commodity.class);
	}
	
	
	
}







